package com.rongke.model;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * @BuyTogetherUser
 * @(buy_together_user)
 * @version : Ver 1.0
 */
@TableName("buy_together_user")
public class BuyTogetherUser implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private Long id;


	/**
	 * @备注:拼团会员id
	 * @字段:muser_id BINARY(11)
	 */
	private Long muserId;

	@TableField(exist=false)
    private Muser muser;

	private Long skuId;

	@TableField(exist = false)
	private Sku sku;

	/**
	 * @备注:现已参与拼团人数
	 * @字段:now_together_num INT(10)
	 */
	private Integer nowTogetherNum;


	/**
	 * @备注:活动是否正在进行(1 正在进行 0 已结束 （对应true false）)
	 * @字段:is_activity_on BIT(0)
	 */
	private Boolean isActivityOn;

    private String buyTogetherCode;



	private Boolean isHead;

	private Integer status;

	/**
	 * @备注:参与拼团时间
	 * @字段:buy_together_time DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date buyTogetherTime;


	/**
	 * @备注:拼团商品id
	 * @字段:btg_id BIGINT(19)
	 */
	private Long btgId;

	@TableField(exist = false)
	private BuyTogetherGoods btg;

	public BuyTogetherUser(){
	}

	public BuyTogetherUser(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public Long getMuserId() {
		return muserId;
	}

	public void setMuserId(Long muserId) {
		this.muserId = muserId;
	}

	public Muser getMuser() {
		return muser;
	}

	public void setMuser(Muser muser) {
		this.muser = muser;
	}

	public Long getSkuId() {
		return skuId;
	}

	public void setSkuId(Long skuId) {
		this.skuId = skuId;
	}

	public Sku getSku() {
		return sku;
	}

	public void setSku(Sku sku) {
		this.sku = sku;
	}

	public String getBuyTogetherCode() {
		return buyTogetherCode;
	}

	public void setBuyTogetherCode(String buyTogetherCode) {
		this.buyTogetherCode = buyTogetherCode;
	}

	public Boolean getHead() {
		return isHead;
	}

	public void setHead(Boolean head) {
		isHead = head;
	}

	public void setBuyTogetherTime(java.util.Date buyTogetherTime) {
		this.buyTogetherTime = buyTogetherTime;
	}

	public java.util.Date getBuyTogetherTime() {
		return this.buyTogetherTime;
	}

	public BuyTogetherGoods getBtg() {
		return btg;
	}

	public void setBtg(BuyTogetherGoods btg) {
		this.btg = btg;
	}

	public void setBtgId(Long btgId) {
		this.btgId = btgId;
	}

	public Long getBtgId() {
		return this.btgId;
	}

	public Integer getNowTogetherNum() {
		return nowTogetherNum;
	}

	public void setNowTogetherNum(Integer nowTogetherNum) {
		this.nowTogetherNum = nowTogetherNum;
	}

	public Boolean getActivityOn() {
		return isActivityOn;
	}

	public void setActivityOn(Boolean activityOn) {
		isActivityOn = activityOn;
	}

	public Integer getStatus() {
		return status;
	}



	public void setStatus(Integer status) {
		this.status = status;
	}
}
